﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ncp.Business;

namespace ncp.Web.Shop
{
    public partial class about : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(typeof(about), Page);
        }

        [AjaxPro.AjaxMethod]
        public string GetAbout(string shop)
        {
            Dictionary<string, object> jsonResult = new Dictionary<string, object>();
            if (CommonBll.IsLegitimateShopId(shop))
            {
                var dt = ClientInfoBll.GetClientById(CommonBll.GetTheRealId(shop).ToString(), CommonConst.DB_Name);
                if (dt.Rows.Count != 0)
                {
                    jsonResult.Add("isreload", true);
                    jsonResult.Add("msg", dt.Rows[0]["User_Remark"]);
                }
                else
                {
                    jsonResult.Add("isreload", false);
                    jsonResult.Add("msg", "0");
                }
            }
            else
            {
                jsonResult.Add("isreload", false);
                jsonResult.Add("msg", "0");
            }
            return "[" + JsonHelper.ObjectToJSON(jsonResult) + "]";
        }
    }
}
